package com.xianrenit.xianrenpuzi.order.config;

import com.xianrenit.xianrenpuzi.common.util.consts.SpzxConst;
import org.apache.kafka.clients.admin.NewTopic;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.kafka.config.TopicBuilder;

@Configuration
public class OrderKafkaConfig {
    @Bean
    public NewTopic orderCreateTopic(){
        return TopicBuilder.name(SpzxConst.SPZX_ORDER_TOPIC)
                .partitions(3)
                .replicas(3)
                .build();
    }
}
